import QueryToast from "@frontend/components/toast/query-toast" import NextTopLoader from "nextjs-toploader" import { i18n } from "@frontend/lib/i18n" import { type LocaleType } from "@shared/i18n/t" import { notFound } from "next/navigation" import Providers from "@frontend/components/providers/providers" import { ReactNode } from "react" import MyToaster from "@frontend/components/toast/my-toaster" import AuthService from "@frontend/services/auth-service" import { Readex_Pro } from "next/font/google" const font = Readex_Pro({ subsets: ["latin"], display: "swap", }) type LocaleLayoutPropsType = { children: ReactNode params: Promise<{ locale: string }> } export default async function LocaleLayout({ children, params, }: LocaleLayoutPropsType) { const resolvedParams = await params const { locale } = resolvedParams if (!i18n.locales.includes(locale as unknown as LocaleType)) { // Needed to handle requests that don't go through middleware (ie /favicon.ico) return notFound() } const session = await AuthService.getSession() return ( {children} ) }